Repository navigation
feat(app-shell): the assistant's entry is an outlined Ask AI button at the end of every page's top-right group - #37885
Conversation
…tton group, and yields its words first Claude-Session: https://claude.ai/code/session_01L9qibwhwiMRQSuaJ1wVVcU Co-authored-by: Claude <noreply@anthropic.com>
…ring, so no locale pack changes Claude-Session: https://claude.ai/code/session_01L9qibwhwiMRQSuaJ1wVVcU Co-authored-by: Claude <noreply@anthropic.com>
…fallback, the header's words-first collapse and Home's entry Claude-Session: https://claude.ai/code/session_01L9qibwhwiMRQSuaJ1wVVcU Co-authored-by: Claude <noreply@anthropic.com>
…ead the layout's own corner entry Claude-Session: https://claude.ai/code/session_01L9qibwhwiMRQSuaJ1wVVcU Co-authored-by: Claude <noreply@anthropic.com>
…oad at collection; the Mac check is a local helper Claude-Session: https://claude.ai/code/session_01L9qibwhwiMRQSuaJ1wVVcU Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-tesla · session_01L9qibwhwiMRQSuaJ1wVVcU Final green head for review · 2026-11-27T09:14Z · zone
|
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a, the seat's L1 thread · 2026-11-27T09:16Z 席位核对 — L1 REWORK @
|
…ontrols The report builder and the inbox keep their own buttons in the top end corner, where the shell's fallback sat over Discard/Save and Mark all read. They now draw the shell's group at the end of their own header through the slot (which counts it, so the fallback steps aside). The fallback sits at the logical end edge, so a right-to-left language puts it where the page headers put the group, not over a page's back or close button. The marketplace package's error-state back button is sized to its words, as on the loaded page. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwhwiMRQSuaJ1wVVcU
|
repo:objectstack#3 · os-tesla · session_01L9qibwhwiMRQSuaJ1wVVcU Final green head for review, rework round 1 · 2026-11-27T10:55Z · zone
|
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwGVgec21LwQTtRY85 For whoever drives this PR (pointer from area o1-D, seat repo:objectstack#1): PR #37889 (#37788, the |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a, the seat's L1 thread · 2026-11-27T10:56Z 席位核对 — L1 delta @
|
… entry branch Resolves AssistantTopBarButton.tsx: the outlined Ask AI faces stay, and main's ui ADR-0057 Amendment A4 guard (not drawn on the app's AI inquiry page) sits right after the component's hooks. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwhwiMRQSuaJ1wVVcU
The page under test draws no header, so ConsoleLayout's corner Ask AI is the entry; a bare button beside it made two. Same change round 0 made to the 34608 and 26470 harnesses. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwhwiMRQSuaJ1wVVcU
|
repo:objectstack#3 · os-tesla · session_01L9qibwhwiMRQSuaJ1wVVcU Final green head for review, merge from main · 2026-11-27T11:59Z · zone
|
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1 ACCEPT (merge-only delta) at Head.
No new finding. Zone may land (non-governed, under 3000 lines). |
|
repo:objectstack#3 · os-tesla · session_01L9qibwhwiMRQSuaJ1wVVcU Landing · 2026-11-27T12:01Z · zone
|
repo:objectstack#3 · os-tesla · session_01L9qibwhwiMRQSuaJ1wVVcU
Requested by Tesla · project thread
Fixes #37858
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
The assistant's one standing entry (
AssistantTopBarButton) is now an outlined button with a chat-bubble icon and the words 「问 AI」 / "Ask AI", replacing the 32 px transparent robot named only by its tooltip. Card items, as written on the card:variant="outline" size="sm",h-8, chat-bubble icon plus the words; pressed style and the amber plan-pending dot kept. The words come from the existinghome.askAIstring (see Acceptance notes: no new key, so no locale pack changes). Mobile is the icon alone atsize-11.assistantIconOnly.ShellAssistantFallback, built likeShellSidebarExpandFallback: the scope counts the button groups actually drawn under it, and where none is, the same button sits over the content's empty top end corner (end-2: top-right, top-left in a right-to-left language) (never on a phone, never with the group turned off, never without AI). Counting drawn groups rather than routes means a page that draws a header through its children is counted correctly. The routes whose page module draws none of the shell headers today (static reading of the route table and each page module at the base commit):search,component/:ns/:name/*,inboxandinbox/:tab,system/marketplace/:packageId,reports/new,create-app,edit-app/:name,design/dashboard/:name, and the not-found route. The report builder's host and the inbox page keep their own controls in that corner, so they draw the group at the end of their own top bar through the slot (ReportBuildertakes an optionalheaderEnd, drawn after Save), which also counts it for the fallback. The marketplace package's error-state Back button is sized to its words (self-start), as on the loaded page.useAskAiEntry, the entry hook whose no-target arm is the button's own toggle; it still asks theaskagent, as it did.aria-label); icon only,aria-labelcarries the same words. The marker's words stay the button's description and are kept out of its name. On a Mac the tooltip shows ⌘⇧I and the button declaresaria-keyshortcuts="Meta+Shift+I"; elsewhere no shortcut is shown or declared (with the words shown and no shortcut to add, there is no tooltip at all).Tests
New pins:
AssistantTopBarButton.askAi-37858.test.tsx: both faces and their names (zh 「问 AI」, en "Ask AI"), noaria-labelon the text face, icon-onlyaria-label, phone 44 px, pressed style and toggle, link face without a drawer host, marker as description not name, Macaria-keyshortcutsplus ⌘⇧I tooltip, no shortcut elsewhere, every built-in pack carries the words.ShellPageActions.askAi-37858.test.tsx: group order ending in Ask AI; icon-only through the slot; corner fallback drawn on a group-less route, gone beside a group, absent on a phone, with the group off and without AI; the header's words-first collapse against a width model (words go before the fold, fold opens before the words return, no flip-flop, a no-fold page keeps the words while only its description is cut, no layout keeps the words).HomePage.askAiEntry-37858.test.tsx: Home's button goes through the entry, on the ask agent, navigating nowhere.ReportBuilderHost.askAiEntry-37858.test.tsx(round 1): inside the shell there is no corner fallback and exactly one Ask AI, in the builder header after Discard and Save; a bare mount ends with Save.InboxPage-36741.test.tsx, two cases added (round 1): the header row ends with unread-only, mark-all-read, divider, shell group; no divider outside the shell.Edited: the objectstack#34827 pin (transition halves), and the two layout harnesses that mounted a bare button beside a header-less page (objectstack#34608, objectstack#26470) now drive the layout's own corner entry; the three edited dock harnesses pay the chat body's grid load at collection, as
check:test-source-aliasprescribes.Ablation: the header's answer forced to "words shown" turns the three collapse cases red (3 failed / 6 passed), restored from the commit. Round 1: the host's
headerEnddisabled on disk turns the new report-builder pin red (1 failed / 1 passed), restored.Readings
ConsoleLayout,PageHeader,AppHeader,ShellPageActionsorHomePage): 249 files / 2903 tests passed at 190b03b; the eight edited/new files re-run at 49369e9: 8 files / 63 tests passed.pnpm --filter @object-ui/app-shell run type-check(src andtsconfig.test.json, which reaches the tests): exit 0, 0 TS errors, after building the dependency closure.Acceptance notes
Clause-②: no. The card asked for a newtopbar.askAikey reusinghome.askAI's translations. Adding it in the eleven packs madeoverlap-checkanswer exit 1 against objectstack#37676 (it shares those packs). The conflicting hunk is objectstack#37676 against current main, not these lines, but the gate counts any conflict on a file the branch changed. The dispatch allows reusing an existing key, so the button readshome.askAIitself: the eleven packs are untouched, and the one entry has one string, which Home's button (now the same entry) already carries.topbar.aiAssistantin every pack, and the standing entry readshome.askAIbeside it. So until C4 the drawer is titled 「AI 助手」 while the button says 「问 AI」. C4 rewrites that pin to "drawer title = conversation title, 「新会话」 before the first send".record-pane-open-assistant, in the list's record drawer and in the record drawer stack) are outside this card's file surface. Carrier: objectstack#37860 or the seat.shellPageActionsSlot.ts, one optional prop. It is the header-to-group channel, and a header must not import the group. Two existing layout harnesses were also edited (objectstack#34608, objectstack#26470), as described under Tests.In ar the end edge is the left, and the x 8..206 positions there sit under the sidebar panel. That is a pre-existing RTL sidebar defect, the same for every page-header group, and is listed in out_of_scope_findings. The inbox detail was opened from the activity tab's first row (detail header present in both locales). During a lazy route's load it shows until the page's header mounts, which is the expand fallback's behaviour too.
Verification
Read first, by risk:
ui/packages/app-shell/src/layout/PageHeader.tsx, the words-first block insideuseActionsFoldandtitleOverflow: the ordering against the fold.ui/packages/app-shell/src/views/ReportBuilderHost.tsx, theheaderEndwiring.ui/packages/app-shell/src/layout/ShellPageActions.tsx,ShellAssistantFallbackand the drawn-group counter.ui/packages/app-shell/src/layout/AssistantTopBarButton.tsx, the two faces and the Mac-only shortcut.Two-minute check:
pnpm --dir ui exec vitest run packages/app-shell/src/layout/__tests__/ShellPageActions.askAi-37858.test.tsx. Expected: 9 passed. Then open any list page in the Console at 1280 px: the header ends with an outlined 「问 AI」 button. Narrow the window and the words go before the page's own buttons fold.Generated by Claude Code